package com.notes.spring.initial;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;

/**
 * @author
 * @Describe spring 初始化，项目启动是执行
 * @date
 */
@Component
public class MyBeanInitial implements InitializingBean {
    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("=======================");
        System.out.println("===========MyBeanInitial afterPropertiesSet============");
        System.out.println("=======================");
    }

    public String print() {
        System.out.println("MyBeanInitial print");
        return "MyBeanInitial print";
    }
}
